package com.rajivnarula.grails.plugin.eventsource
import com.rajivnrula.grails.plugin.eventsource.Event

class EventSourceService {

    static transactional = true

    def save(domainObject) {
    	Event event = new Event ()
    	event.objectId = domainObject.id
    	event.event= event.toString()
    	event.when = new Date()
    	event.className = domainObject.getClass().getName()
    	
   	
    	domainObject.save(flush: true)

    }
}
